import request from '@/utils/request'

// 获取部门列表
export const getDepartment = () => request({
  url: '/company/department'
})
// 新增部门

export const addDepartment = (data) => request({
  url: '/company/department',
  method: 'POST',
  data
})

// 查询部门详情
export const getDeptmentInfo = (id) => request({
  url: `/company/department/${id}`
})

// 根据 id修改部门信息
export const updateDeptmentInfo = (data) => request({
  url: `/company/department/${data.id}`,
  method: 'PUT',
  data
})
// 根据id删除部门
export const delDeptment = (id) => request({
  url: `/company/department/${id}`,
  method: 'DELETE'
})
